home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / tools / mve.awk < prev    next >
Encoding:
AWK Script  |  1997-04-01  |  471 b   |  22 lines

  1. #!/usr/bin/nawk  -f
  2. #
  3. # Make Vim Errors
  4. # Processes errors from cc for use by Vim's quick fix tools
  5. # specifically it translates the ---------^ notation to a
  6. # column number
  7. #
  8. BEGIN { FS="[:,]" }
  9.  
  10. /^cfe/ { file=$3
  11.          msg=$5
  12.          split($4,s," ")
  13.          line=s[2]
  14. }
  15.  
  16. # You may have to substitute a tab character for the \t here:
  17. /^[\t-]*\^/ {
  18.         p=match($0, ".*\\^" )
  19.         col=RLENGTH-2
  20.         printf("%s, line %d, col %d : %s\n", file,line,col,msg)
  21. }
  22.